package model.entity;

import game_engine.core.Entity;

import java.awt.Color;

public class Menu extends Entity {
	
	private String label;
	private boolean selected;
	private String[] values = null;

	public Menu(String label, boolean selected) {
		super("Menu " + label);
		this.label = label;
		this.selected = selected;
	}
	
	@Override
	public void collided(Entity e) {

	}

	@Override
	public void doAction(float tick) {

	}

	@Override
	public void render() {
		Color color = selected?Color.red:Color.white;
		if(values!=null) {
//			GEWindowOGL.drawString(label + " : " + values[value], position.x, position.y, 30, color, 1.0f);
		}
//		else
//			GEWindowOGL.drawString(label, position.x, position.y, 30, color, 1.0f);
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public boolean isSelected() {
		return selected;
	}

	public void setSelected(boolean selected) {
		this.selected = selected;
	}
	
	public void setValues(String[] values) {
		this.values = values;
	}
	
	@Override
	public void setValue(int value) {
		if(values!=null) {
			this.value = value%values.length;
			if(this.value<0) this. value= values.length-1;
		}
	}
}
